package com.yanqu.road.entity.config.beauty;

import com.yanqu.road.utils.string.StringUtils;

import java.util.List;

public class BeautyMusicRoomSkillInfo {
    private int skillId;
    private int unlockNeedSkillId = 0;
    private int unlockLevel = 0;

    public BeautyMusicRoomSkillInfo(String s) {
        //配置格式：技能ID；解锁条件（已拥有技能ID=技能等级）
        String[] split = s.split(";");
        this.skillId = Integer.parseInt(split[0]);
        if (split.length > 1) {
            List<Integer> list = StringUtils.stringToIntegerList(split[1], "=");
            this.unlockNeedSkillId = list.get(0);
            this.unlockLevel = list.get(1);
        }
    }

    public int getSkillId() {
        return skillId;
    }

    public void setSkillId(int skillId) {
        this.skillId = skillId;
    }

    public int getUnlockNeedSkillId() {
        return unlockNeedSkillId;
    }

    public void setUnlockNeedSkillId(int unlockNeedSkillId) {
        this.unlockNeedSkillId = unlockNeedSkillId;
    }

    public int getUnlockLevel() {
        return unlockLevel;
    }

    public void setUnlockLevel(int unlockLevel) {
        this.unlockLevel = unlockLevel;
    }
}
